package br.com.edumobi.activities;

import android.os.Bundle;

import br.com.edumobi.R;
import br.com.edumobi.excecoes.ExcecaoCadastroAlunoMalsucedido;
import br.com.edumobi.fragments.CadastroFragment;

public class CadastroActivity extends GenericaActivity implements CadastroFragment.AcoesCadastrarFragment {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_cadastro);
    }

    @Override
    public Boolean onCadastrarAluno(String nome, String email, String cpf) {

        try {
            nuvem.cadastrarAluno(nome, email, cpf);
            return true;
        } catch (ExcecaoCadastroAlunoMalsucedido excecaoCadastroAlunoMalsucedido) {
            return false;
        }
    }
}
